home *** CD-ROM | disk | FTP | other *** search
/ HAKERIS 11 / HAKERIS 11.ISO / linux / system / LinuxConsole 0.4 / linuxconsole0.4install-en.iso / opt0.4.lcm / share / penggy / chat / global2.scm < prev   
Encoding:
Text File  |  2004-02-26  |  3.2 KB  |  88 lines

  1. ;;
  2. ;; Copyright (C) 2002-2003  Jean-Charles Salzeber <jc@varspool.net>
  3. ;;
  4. ;; This file is part of penggy.
  5. ;;
  6. ;; This program is free software; you can redistribute it and/or
  7. ;; modify it under the terms of the GNU General Public License
  8. ;; as published by the Free Software Foundation; either version 2
  9. ;; of the License, or (at your option) any later version.
  10. ;; 
  11. ;; This program is distributed in the hope that it will be useful,
  12. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. ;; GNU General Public License for more details.
  15. ;; 
  16. ;; You should have received a copy of the GNU General Public License
  17. ;; along with this program; if not, write to the Free Software
  18. ;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  19. ;; 02111-1307, USA.
  20. ;;                
  21. ;; $Id: global2.scm,v 1.5 2003/02/01 13:45:28 chupa Exp $
  22. ;;
  23.  
  24.  
  25. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  26. ;;                                                                  ;;
  27. ;; Scheme script for logon into Globalnet Plus servers              ;;
  28. ;;                                                                  ;;
  29. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  30.  
  31.  
  32. (define (talk-to-network)
  33.   (chat-send "aoluser@aol.com\r")
  34.   (chat-try 20
  35.       '("Password"   (begin
  36.                  (chat-send "aolpw\r")
  37.                  (chat-try 60
  38.                      '("Connected"      (chat-success))
  39.                      '("Open"           (chat-success))
  40.                      '("Unavailable"    (chat-failure))
  41.                      '("Connect Failed" (chat-failure))
  42.                      '("Not Available"  (chat-failure))
  43.                      '("Unreachable"    (chat-failure))
  44.                      '("No Connection"  (chat-failure))
  45.                      '("Bad Password"   (chat-failure))
  46.                      '("Failed"         (chat-failure))
  47.                      '("Login Invalid"  (chat-failure))
  48.                      '("Invalid User"   (chat-failure))
  49.                      '("Error in"       (chat-failure))
  50.                      '("Server Timeout" (chat-failure))
  51.                      '("NO CARRIER"     (chat-failure))
  52.                      '(else             (chat-failure)))))
  53.       '("NO CARRIER" (chat-failure))
  54.       '(else         (chat-failure))))
  55.  
  56. (define (talk-to-livingston)
  57.   (chat-send "aoluser@aol.com\r")
  58.   (chat-try 20
  59.       '("Password"   (begin
  60.                  (chat-send "aolpw\r")
  61.                  (chat-try 10
  62.                      '("Unavailable"    (chat-failure))
  63.                      '("Connect Failed" (chat-failure))
  64.                      '("Not Available"  (chat-failure))
  65.                      '("Unreachable"    (chat-failure))
  66.                      '("No Connection"  (chat-failure))
  67.                      '("Bad Password"   (chat-failure))
  68.                      '("Failed"         (chat-failure))
  69.                      '("Login Invalid"  (chat-failure))
  70.                      '("Error in"       (chat-failure))
  71.                      '("Server Timeout" (chat-failure))
  72.                      '("NO CARRIER"     (chat-failure))
  73.                      '(else             (chat-success)))))
  74.       '("NO CARRIER" (chat-failure))
  75.       '(else         (chat-failure))))
  76.  
  77.  
  78.  
  79. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  80. ;; Main entry point
  81. (define (chat-connect)
  82.   (chat-try 20
  83.       '("Login"      (talk-to-network))
  84.       '("Username"   (talk-to-network))
  85.       '("Livingston" (talk-to-livingston))
  86.       '("NO CARRIER" (chat-failure))
  87.       '(else         (chat-failure))))
  88.